﻿using System;
using UnityEditor;
using UnityEngine;

namespace EditorExtension
{
    public class EditorPrefsExample
    {
        private const string Key = "EditorPrefsExample";
        
        [MenuItem("EditorExtensions/04_Data/EditorPrefs/SaveTime")]
        static void SaveTime()
        {
            EditorPrefs.SetString(Key, DateTime.Now.ToString());
        }
        
        [MenuItem("EditorExtensions/04_Data/EditorPrefs/ReadTime")]
        static void ReadTime()
        {
            Debug.Log(EditorPrefs.GetString(Key));
        }
    }
}